package cn.lg.soar.system.auth.mapper;

import cn.lg.soar.system.auth.entity.TokenCurrBind;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public interface TokenCurrBindMapper extends BaseMapper<TokenCurrBind> {

    @Delete("DELETE a FROM lg_sys_token_curr_bind a WHERE NOT EXISTS (select 1 from lg_sys_token_info b where a.id=b.id)")
    void optimize();

}
